﻿#include <iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

void add_family(map<string, vector<string>>& families,const string& familiy_name){
    if (families.find(family_name) == families.end()) {
        families[family_name] = vector<string>();
    }
}
void add_child(map<string, vector<string>>& families, const string& familiy_name, const string& child_name) {
    families[family_name].push.back(child_name);
}struct DisPlay {
void operator()(pair<string, vector<string>>info) {
    cout << info.first << "家有小孩:";
    for (auto& w : info.second) {
        cout << info.first << w ;
    }
}
int main(){
    map<string, vector<string>>families;
    add_family(families, "张");
    add_child(families, "张","三");
    for_each (families.begin(), families.end(), DisPlay());
  
}

